#################
# Master code
# EU legislature
#################
# clear memory
rm(list=ls())

# load rstan library
library(rstan)
options(mc.cores = parallel::detectCores())
rstan_options(auto_write = TRUE)


############################################################################################
# Scale-down version:

# CBQ estimations
t0 <- Sys.time()
source("replication_Rasmussen/cbq_leg_q1_s.R")
t1 <- Sys.time()
source("replication_Rasmussen/cbq_leg_q2_s.R")
t2 <- Sys.time()
source("replication_Rasmussen/cbq_leg_q3_s.R")
t3 <- Sys.time()
source("replication_Rasmussen/cbq_leg_q4_s.R")
t4 <- Sys.time()
source("replication_Rasmussen/cbq_leg_q5_s.R")
t5 <- Sys.time()
source("replication_Rasmussen/cbq_leg_q6_s.R")
t6 <- Sys.time()
source("replication_Rasmussen/cbq_leg_q7_s.R")
t7 <- Sys.time()
source("replication_Rasmussen/cbq_leg_q8_s.R")
t8 <- Sys.time()
source("replication_Rasmussen/cbq_leg_q9_s.R")
t9 <- Sys.time()

# substantive interpretation
source("replication_Rasmussen/substantive_interpret_leg.R")
t10 <- Sys.time()

dur1 = t1 - t0
dur2 = t2 - t1
dur3 = t3 - t2
dur4 = t4 - t3
dur5 = t5 - t4
dur6 = t6 - t5
dur7 = t7 - t6
dur8 = t8 - t7
dur9 = t9 - t8
dur10 = t10 - t9
dur11 = t10 - t0

dur1
dur2
dur3
dur4
dur5
dur6
dur7
dur8
dur9
dur10
dur11


############################################################################################
# To reproduce the original figures and tables, please uncomment the following line
# source("replication_Rasmussen/archive/origin_legislature.R")




